<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends BaseAction {
	
    public function index(){
        $this->getNew();   
        $this->display();
        
    }
    
   

    //获取新闻
    public function getNew(){
    	$NewModel = M('New');
    	$NewList = $NewModel -> select();
    	$this -> assign('newList',$NewList);
 
    }
    
    public function getNewList(){
    	
    	$id = $this->_get('id');
    	$NewModel = M('New');
    	$NewList = $NewModel -> where('titleid='.$id) -> select();
    	$this -> assign('newList',$NewList);
    	
    	$this -> display('new');
    }
   
}